

<%@ page import="auth.Userprofile" %>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
        <meta name="layout" content="main" />
        <g:set var="entityName" value="${message(code: 'userprofile.label', default: 'Userprofile')}" />
        <title><g:message code="default.edit.label" args="[entityName]" /></title>
    </head>
    <body>
    	<div class="nav">
            <span class="menuButton"><g:link controller="userprofile" action="showData">Meine Daten</g:link></span>
        </div>
        <div class="body col_12 col">
            <h1><g:message code="default.edit.label" args="[entityName]" /></h1>
            <g:if test="${flash.message}">
            <div class="message">${flash.message}</div>
            </g:if>
            <g:hasErrors bean="${userprofileInstance}">
            <div class="errors">
                <g:renderErrors bean="${userprofileInstance}" as="list" />
            </div>
            </g:hasErrors>
            <g:form method="post" >
                <g:hiddenField name="id" value="${userprofileInstance?.id}" />
                <g:hiddenField name="version" value="${userprofileInstance?.version}" />
                <div class="dialog">
                    <table class="col_12 col">
                        <tbody>
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                  <label for="firstName">Vorname:</label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean: userprofileInstance, field: 'firstName', 'errors')}">
                                    <g:textField name="firstName" value="${userprofileInstance?.firstName}" />
                                </td>
                            </tr>
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                  <label for="lastName">Nachname:</label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean: userprofileInstance, field: 'lastName', 'errors')}">
                                    <g:textField name="lastName" value="${userprofileInstance?.lastName}" />
                                </td>
                            </tr>
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                  <label for="dateOfBirth">Geburtsdatum:</label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean: userprofileInstance, field: 'dateOfBirth', 'errors')}">
                                    <g:datePicker name="dateOfBirth" precision="day" value="${userprofileInstance?.dateOfBirth}"  />
                                </td>
                            </tr>
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                  <label for="gender">Geschlecht:</label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean: userprofileInstance, field: 'gender', 'errors')}">
                                    <g:select name="gender" from="${userprofileInstance.constraints.gender.inList}" value="${userprofileInstance?.gender}" valueMessagePrefix="userprofile.gender"  />
                                </td>
                            </tr>
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                  <label for="address">Adresse:</label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean: userprofileInstance, field: 'address', 'errors')}">
                                    <g:textField name="address" value="${userprofileInstance?.address}" />
                                </td>
                            </tr>
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                  <label for="city">Stadt:</label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean: userprofileInstance, field: 'city', 'errors')}">
                                    <g:textField name="city" value="${userprofileInstance?.city}" />
                                </td>
                            </tr>
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                  <label for="state">Staat:</label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean: userprofileInstance, field: 'state', 'errors')}">
                                    <g:textField name="state" value="${userprofileInstance?.state}" />
                                </td>
                            </tr>
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                  <label for="zipcode">Postleitzahl:</label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean: userprofileInstance, field: 'zipcode', 'errors')}">
                                    <g:textField name="zipcode" value="${userprofileInstance?.zipcode}" />
                                </td>
                            </tr>
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                  <label for="email">Email:</label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean: userprofileInstance, field: 'email', 'errors')}">
                                    <g:textField name="email" value="${userprofileInstance?.email}" />
                                </td>
                            </tr>
                        
                        </tbody>
                    </table>
                </div>
                <div class="buttons col_6 col" style=height:80px>
                    <span class="button"><g:actionSubmit class="save" action="update" value="Aktualisieren" /></span>
                    <span class="button"><g:actionSubmit class="delete" action="delete" value="L&ouml;schen" onclick="return confirm('Bist du sicher?');" /></span>
                </div>
            </g:form>
        </div>
    </body>
</html>
